package flex.persistence.criteria {
	import flex.persistence.EntityManager;
	import flex.persistence.EntityTransaction;

	public interface CriteriaQuery extends AbstractQuery {
		
	
		
		/**
		 * select(selections:Selection):CriteriaQuery
		 * Add one selection item that is to be returned in the query result.
		 * select(selections:Array):CriteriaQuery
		 * Add severals selection items that are to be returned in the query result.
		 */
		function select(selections:Object):CriteriaQuery;	
		
		/**
		 * orderBy(orders:Order):CriteriaQuery
		 * Add one ordering expression that is used to order the query results.
		 * orderBy(orders:Array):CriteriaQuery
		 * Add severals ordering expression that are used to order the query results.
		 */ 
		function orderBy(orders:Object):CriteriaQuery 

		
		function getGroupBy():Array;
		function getHaving():Array;		
		function get transaction():EntityTransaction ;
		function get entityManager():EntityManager;
		function get restrictions():Array ;
		function get orders():Array;
		function get selections():Array;
		function get aliasIndex():uint;
		
		
		//à faire
		
		/*

		function multiselect(selections:Array):CriteriaQuery;
		function where(restriction:Expression):CriteriaQuery;
		function wherePredicate(restrictions:Array):CriteriaQuery;
		function groupBy(grouping:Array):CriteriaQuery;
		function having(restriction:Expression):CriteriaQuery;
		function havingPredicate(restrictions:Array):CriteriaQuery;

		function distinct(distinct:boolean):CriteriaQuery;
		function getOrderList():Array;
		function getParameters():Array;
		
		*/
	}
}